package com.blackhosrse.rabbitmq.consumer;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

//消费者监听类
@Component
public class MyListener {

    @RabbitListener(queues = "item_queue")
    public void recieveMessage(String msg) {
        System.out.println("消费者收到消息：" + msg);
    }
}
